    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};
// 登录
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};
// 专属菜单
export const getMenuByUserId = () => {
    return service({
        url: '/user/index/getMenuByUserId',
        method: 'get'
    })
};
// 品牌列表
export const getBrandList = (data:any) => {
    return service({
        url: '/shop/index/getBrandList',
        method: 'post',
        data
    })
};
// 添加品牌
export const saveBrand = (data:any) => {
    return service({
        url: '/shop/index/saveBrand',
        method: 'post',
        data
    })
};
// 修改品牌
export const updateBrand = (data:any) => {
    return service({
        url: '/shop/index/updateBrand',
        method: 'post',
        data
    })
};
// 删除品牌
export const deleteBrandById = (data:any) => {
    return service({
        url: '/shop/index/deleteBrandById',
        method: 'post',
        data
    })
};
// 批量删除品牌
export const deleteBatchByIds = (data:any) => {
    return service({
        url: '/shop/index/deleteBatchByIds',
        method: 'post',
        data
    })
};
// 新增品牌
export const saveType = (data:any) => {
    return service({
        url: '/shop/index/saveType',
        method: 'post',
        data
    })
};

// 类型分级
export const selectTypeList = (data:any) => {
    return service({
        url: '/shop/index/selectTypeList',
        method: 'post',
        data
    })
};

// pid获取字典值
export const getDictValueByRedis = (data:any) => {
    return service({
        url: '/shop/index/getDictValueByRedis/'+data,
        method: 'get',
    })
};
// pid获取字典值
export const getSelectBrand = () => {
    return service({
        url: '/shop/index/getSelectBrand',
        method: 'post',
    })
};
// 校验spu重复
export const checkIfRepeat = (data:any) => {
    return service({
        url: '/shop/index/checkIfRepeat',
        method: 'post',
        data
    })
};
// 商品加进
export const saveProduct = (data:any) => {
    return service({
        url: '/shop/index/saveProduct',
        method: 'post',
        data
    })
};

// 商品列表
export const joinSelectProdList = (data:any) => {
    return service({
        url: '/shop/index/joinSelectProdList',
        method: 'post',
        data
    })
};
// 商品列表
export const saveProFileOk = (data:any) => {
    return service({
        url: '/shop/index/saveProFileOk',
        method: 'post',
        data
    })
};
// 商品批删
export const deleteGoodsBatch = (data:any) => {
    return service({
        url: '/shop/index/deleteGoodsBatch',
        method: 'post',
        data
    })
};
// 订单列表
export const SelectOrderList = (data:any) => {
    return service({
        url: '/shop/index/SelectOrderList',
        method: 'post',
        data
    })
};
// 上架商品下拉
export const selectUpGoods = () => {
    return service({
        url: '/shop/index/selectUpGoods',
        method: 'get',
        
    })
};
// 上架商品下拉
export const saveOrderOk = (data:any) => {
    return service({
        url: '/shop/index/saveOrderOk',
        method: 'post',
        data
        
    })
};
// 订单批删
export const delBatchOrder = (data:any) => {
    return service({
        url: '/shop/index/delBatchOrder',
        method: 'post',
        data
        
    })
};

// 从es中查询出来商品数据
export const joinSelectProdListByEs = (data:any) => {
    return service({
        url: '/shop/index/joinSelectProdListByEs',
        method: 'post',
        data
        
    })
};
// 批量商家商品
export const barchUpProd = (data:any) => {
    return service({
        url: '/shop/index/barchUpProd',
        method: 'post',
        data
        
    })
};

